<!-- 修改资源组件 -->
<template>
	<div id="updatepermismanage	">	
		<el-dialog title="修改资源菜单" :visible.sync="dialogFormVisible" append-to-body>
		  <el-form :model="form">
		    <el-form-item label="权限编号" :label-width="formLabelWidth">
		      <el-input v-model="form.Id" autocomplete="off"></el-input>
		    </el-form-item>
				<el-form-item label="权限文本" :label-width="formLabelWidth">
				  <el-input v-model="form.permistitle" autocomplete="off"></el-input>
				</el-form-item>
				<el-form-item label="链接" :label-width="formLabelWidth">
				  <el-input v-model="form.href" autocomplete="off"></el-input>
				</el-form-item>
				<el-form-item label="所属父菜单" :label-width="formLabelWidth">
					<el-select v-model="form.parent" placeholder="请选择类型">
						<el-option :label="parentObj.permistitle" :value="parentObj.id" 
						v-for=" parentObj in form.parentlist" :key="form.parentlist">
						</el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="权限名字" :label-width="formLabelWidth">
				  <el-input v-model="form.permisname" autocomplete="off"></el-input>
				</el-form-item>
				<el-form-item label="权限类型" :label-width="formLabelWidth">
					<el-select v-model="form.permistype" placeholder="请选择类型">
						<el-option label="区域一" value="shanghai"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="描述" :label-width="formLabelWidth">
				  <el-input v-model="form.description" autocomplete="off"></el-input>
				</el-form-item>
		  </el-form>
		  <div slot="footer" class="dialog-footer">
		    <el-button @click="dialogFormVisible = false">取 消</el-button>
		    <el-button type="primary" @click="add">修  改</el-button>
		  </div>
		</el-dialog>
	</div>
</template>
<script>
  export default {
    data() {
      return {
        dialogFormVisible: this.isvisble,
        form: {},
        formLabelWidth: '120px'
      };
    },
	props:["isvisble"],
	methods:{
		refupdateper(s,updatearr){
			this.dialogFormVisible=s;
			// updatearr是addpermismanage页面传过来的数组，数组里面有点击编辑获取的数据
			this.form.Id=updatearr.id;
			this.form.permistitle=updatearr.permistitle;
			this.form.href=updatearr.href;
			this.form.parent=updatearr.parent;
			this.form.permisname=updatearr.permisname;
			this.form.permistype=updatearr.permistype;
			this.form.description=updatearr.description;
		},
		add(){
			this.dialogFormVisible=false;
		}
	}
  };
</script>

<style scoped>
</style>